# {% if es_config['cluster.name'] is not defined %}
# cluster.name: elasticsearch
# {% endif %}

# {% if es_config['node.name'] is not defined %}
# node.name: 
# {% endif %}

# node.master: true
# node.data: false
cluster.name: {{ es_cluster_name }}
# node.name: {{ansible_nodename }}/{{ ansible_eth0['ipv4']['address'] }}
node.name: {{ ansible_hostname }}/{{ ansible_eth0['ipv4']['address'] }}

# http://www.cnblogs.com/muzhiye/p/elasticsearch_set_cluster.html
# network.host: 0.0.0.0
network.host: [_local_, {{ ansible_eth0['ipv4']['address'] }}]

# bootstrap.mlockall: true
bootstrap.memory_lock: true
# discovery.zen.minimum_master_nodes: 2
# gateway.recover_after_nodes: 3
# discovery.zen.ping.unicast.hosts: 
# discovery.zen.ping.multicast.enabled: false
action.destructive_requires_name: true
path.data: {{ es_data_path }}
path.logs: {{ es_log_path }}

{% if es_config %}
{{ es_config | to_nice_yaml }}
{% endif %}
